
    <html>
    <head>
    	<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
		<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
		<!-- 新 Bootstrap 核心 CSS 文件 -->
		<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
		<!-- 可选的Bootstrap主题文件（一般不用引入） -->
		<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
	    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="default.css" rel="stylesheet">
    </head>
        <body>
            <h1 id="centos7">CentOS7更换国内阿里源</h1>
<h2 id="linuxhttpmirrorsaliyuncom">阿里云Linux安装镜像源地址：<a href="http://mirrors.aliyun.com/">http://mirrors.aliyun.com/</a></h2>
<h2 id="centos">CentOS系统更换软件安装源</h2>
<ol>
<li>服务器安装wget</li>
</ol>
<p><code># yum -y install wget</code></p>
<ol>
<li>备份原镜像文件，以免出错后可以恢复</li>
</ol>
<p><code># mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup</code></p>
<ol>
<li>下载新的CentOS-Base.repo 到/etc/yum.repos.d/</li>
</ol>
<p><code># wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo</code></p>
<ol>
<li>运行yum makecache生成缓存</li>
</ol>
<p><code># yum clean all
  # yum makecache
  # yum -y update</code></p>
        </body>
    </html>
    